#include<iostream>
#include<cmath>
using namespace std;

typedef long long ll;
int main()
{
    ll x;
    cin >> x;
    ll a = sqrt(x);
    ll x1 = a * a, x2 = (a + 1) * (a + 1);
    if (abs(x1 - x) < abs(x2 - x))
        cout << x1 << endl;
    else
        cout << x2 << endl;
    return 0;
}